package com.SmartCampus.system.service.impl;

import com.SmartCampus.system.mapper.LostandfoundMapper;
import com.SmartCampus.system.model.dto.lostAndFound.LostAndFoundQueryRequest;
import com.SmartCampus.system.model.entity.Lostandfound;
import com.SmartCampus.system.model.vo.LostandfoundVO;
import com.SmartCampus.system.service.LostandfoundService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author wangliang
* @description 针对表【lostAndFound(失物招领表)】的数据库操作Service实现
* @createDate 2024-12-26 18:54:38
*/
@Service
public class LostandfoundServiceImpl extends ServiceImpl<LostandfoundMapper, Lostandfound>
    implements LostandfoundService {

    @Resource
    private LostandfoundMapper lostandfoundMapper;

    @Override
    public Page<LostandfoundVO> getLostByAll(Page<LostandfoundVO> page, LostAndFoundQueryRequest lostAndFoundQueryRequest) {
        List<LostandfoundVO> list = lostandfoundMapper.getLostByAll(page,lostAndFoundQueryRequest);
        return page.setRecords(list);
    }

    @Override
    public Page<LostandfoundVO> getLostByMy(Page<LostandfoundVO> page, LostAndFoundQueryRequest lostAndFoundQueryRequest, Long userId) {
        List<LostandfoundVO> list = lostandfoundMapper.getLostByMy(page,lostAndFoundQueryRequest,userId);
        return page.setRecords(list);
    }
}




